home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
018a
/
wpmd2.zip
/
WPMD2.DOC
next >
Wrap
Text File
|
1990-02-12
|
26KB
|
557 lines
Copyright (c) 1989-90
by David Seidman
February 12, 1990
L---r+---T1----+-T--2----T----3--T-+----4T---+---T5----+-T--6----T----R--T-+--r
WPMD -- the WordPerfect 5 File Doctor
Things can go wrong with WordPerfect 5.x (that is, 5.0 or 5.1) files.
Text may disappear. WordPerfect 5 (WPerf5) may stop recognizing a file
as a WPerf5 document file. And other strange things may happen. We
don't why they happen, but we can do something about them when they do.
If your WPerf5 files get sick, WPMD, the WordPerfect 5 File Doctor, may
be able to help. It cannot help if what should be in your file has
simply vanished from your disk, but that is not what usually happens.
Check the size of your file with the DOS DIR command. If the number of
bytes is not too small, your text is probably still there, and it is
time to call the File Doctor. If WPMD does help cure your file, you
should consider paying the license fee for this shareware product.
Information about how to do so appears below.
WPMD has two ways of operating. The Ordinary Way is very simple to
use. The other way, Drastic Surgery, is a lot more complicated.
Fortunately, the Ordinary Way is usually all you need.
The Ordinary Way
What It Does
WPerf5 codes are stored as series of bytes that have meaning to WPerf5,
not as what you see in Reveal Codes. If even one byte in a code is
incorrect, WPerf5 can get hopelessly confused. The most dramatic
result of this confusion is the complete disappearance from the screen
of the entire text of your document; even though the text is actually
all there in the file, WPerf5 shows nothing but a blank screen. Less
dramatically, you may lose part of the text, or the text may become
incorrect in other ways.
WPMD handles this situation by looking for messed up codes. Usually
when it finds them, it deletes them and leaves the message **FIX** in
their place. If WPMD's cure works well, you just retrieve the fixed
file into WPerf5, search for **FIX**, and see if anything is missing at
that point. At least one code is likely to be missing. In addition,
you will often see garbage -- erroneous characters and codes -- after
the **FIX** message. The garbage is the remains of broken codes.
Simply delete it.
In rare cases, WPMD will cure the problem without leaving a **FIX**
message. This happens when WPMD figures out exactly what the incorrect
bytes should be and replaces them with the correct ones.
In all cases, when WPMD fixes the file, PROOFREAD carefully. WPerf5
may have changed characters in your text in ways WPMD cannot detect.
Using The Ordinary Way
Run WPMD from the DOS command line. The command line looks like this:
C>WPMD Infile Outfile
Infile is the name (including drive and directory, if necessary) of the
sick file, and Outfile is the name (including drive and directory, if
necessary) of the fixed output file.
For example,
C>WPMD c:\wp50\letters\John.wp5 c:\wp50\letters\John.fix
Once you have started the program by hitting <RETURN>, the program may
ask you if you are sure Infile is a WordPerfect 5 document file. If it
asks, answer with either Y or N. If the answer is Y, the program
continues. If the answer is N, the program quits.
The program may also respond with a different message and then stop. If
it does, you have to figure out what to do next. For example, WPMD may
tell you it can't find the input file. In that case, you should see if
there is an error on your command line. But some messages make clear
that WPMD thinks there are problems in the input file that it cannot
handle in the Ordinary Way. At that point, you have two choices.
First, you can give up. Second, you can try Drastic Surgery.
Special Problems With Notes:
Codes may appear in two places within a note (footnote or endnote) in
WordPerfect 5. The first is before the note number; the second is
after the note number. If a broken code appears before the note number
in a note which itself is not broken, WPMD cannot fix the problem. If
a broken code appears after the note number in a note which itself is
not broken, WPMD can fix the problem, but the process is more
complicated than fixing broken codes in other locations.
The problem is that in fixing the broken code within a note, WPMD in
effect breaks the note code. So after you run WPMD once, the result
may be worse than what you started with. If you run WPMD on the
partially-fixed file, the problem is cured by this second pass.
For example,
>WPMD First Out.1
>WPMD Out.1 Fixed
How do you know if the original problem was a broken code within a
note? You don't. Of course, you know this was not the problem if you
didn't use footnotes or endnotes. If you did use notes, you can only
guess whether the problem is a broken code within the note. So if you
did use notes and the first run through WPMD, producing Outfile from
Infile, results in a file that WPerf5 does not read properly, try using
the Ordinary Way a second time, creating Outfile2 from Outfile.
Drastic Surgery
Use Drastic Surgery when all else fails. That is, use it after you
have tried the Ordinary Way, and after you have tried FIXPRE. (For
those not familiar with FIXPRE, it is briefly described below.)
What It Does
Drastic Surgery does nothing to the text of your document. Instead, it
amputates the document prefix, the part of the document file you do not
see in WPerf5, and replaces it with another document prefix. This
amputation loses a good deal of information, including graphics,
styles, and initial codes (unless you have the same information
available in the prefix of another file). If the only problem is a
problem in the prefix, Drastic Surgery may be all the cure you need.
But Drastic Surgery may simply allow WPerf5 to get to the rest of the
document, where there could also be problems. So if Drastic Surgery
does not fully cure your file, try the Ordinary Way again, using the
re-prefixed file produced by Drastic Surgery as the input file.
Using Drastic Surgery
You use Drastic Surgery from the DOS command line. The first part of
the command line is just like the command line for the Ordinary Way.
But there is another item on the command line, plus one option:
C>WPMD Infile Outfile -dhex [-gfilespec]
where "hex" is a number, in hexadecimal, indicating the "offset" in the
input file where the actual text of your document starts. The optional
-gfilespec allows you to replace the prefix of the file you are fixing
with the prefix of another WP5 file. In this option, "filespec" is the
specification of a WP5 file with the prefix you want to use. If you do
not use the -g option, WPMD will create a new WP5.0 prefix containing
the barest minimum of information. It will usually be better to use
the -g option.
Of course, you don't know the offset of the start of the text. It is
not something you ordinarily need to know when you use WordPerfect.
For those used to working with "hexdumps" of DOS files, finding the
required number is a familiar problem. For the benefit of those who
are not used to working with hexdumps, we explain below everything you
need to know to find the number you need to enter on the command line
following the -d.
The first thing you need is a program that will display a file as a
"hexdump." Lots of programs do that, although they do not all do it in
quite the same way. I use Vernon Buerg's LIST. It is a wonderful
program, and no one who uses an MS-DOS computer should be without it.
It is shareware -- Buerg requests a contribution of $20 from LIST
users. You can find the program on almost any BBS, or you can send the
money to Buerg and ask him to send you the program. The address
appears below.
The next thing you need is knowledge of how to count to fifteen in
hexadecimal, which is "base 16". As Tom Lehrer once said, base 16 is
just like base 10 if you have sixteen fingers. So counting to fifteen
in hexadecimal is a lot like counting to 9 in decimal. It works like
this:
0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
The A in hexadecimal is equivalent to 10 in the more usual base 10, or
decimal, system, the B to 11, the C to 12, the D to 13, the E to 14,
and the F to 15.
Now we need an example file. So I made up an example WPerf50 file,
named EXAMPLE. In it, I typed this:
This is an example.
We need to look at that file in LIST. Ignoring complexities of paths,
directories, and so forth, what we need is this:
C:>LIST Example
LIST now displays some curious-looking garbage, which we can ignore. To
get LIST to display the file in hex, we need to use the Alt-H command.
So hold down Alt and hit H. And to make the screen a little easier to
read (and easier to display in this document), hit *, the "star
filter." The result is a screen that looks something like this:
LIST 1 22 05-06-89 14:54 + f:EXAMPLE
000000 FF 57 50 43 44 01 00 00-01 0A 00 00 00 00 00 00 .WPCD...........
000010 FB FF 05 00 32 00 08 01-00 00 07 00 0F 00 00 00 ....2...........
000020 42 00 00 00 02 00 56 00-00 00 51 00 00 00 0C 00 B.....V...Q.....
000030 57 00 00 00 A7 00 00 00-03 00 0A 00 00 00 FE 00 W...............
000040 00 00 43 6F 75 72 69 65-72 20 31 30 20 63 70 69 ..Courier 10 cpi
000050 00 00 00 FF FF 6D 00 5B-00 78 00 78 00 78 00 0A .....m.[.x.x.x..
000060 00 01 00 00 00 00 00 C2-01 15 B4 C2 01 78 00 14 .............x..
000070 1E 0C 17 8C 0A 00 00 00-04 11 40 C9 00 29 73 E5 ..........@..)s.
000080 01 1B 00 FE FE FE FE FE-FE FE FF FE FF FF FF FF ................
000090 FF FF FE FF FF FF FF FF-FF FF FF FF FF FF FF FF ................
0000A0 FF FF FF FF FF FF FF 50-61 6E 61 73 6F 6E 69 63 .......Panasonic
0000B0 20 4B 58 2D 50 31 30 39-31 78 00 78 00 78 00 78 KX-P1091x.x.x.x
0000C0 00 78 00 00 00 78 00 00-00 00 00 00 50 41 4B 58 .x...x......PAKX
0000D0 50 31 30 39 2E 50 52 53-00 C2 01 78 00 14 1E 0C P109.PRS...x....
0000E0 17 8C 0A 00 00 00 04 11-40 C9 00 29 73 E5 01 1B ........@..)s...
0000F0 00 00 00 00 00 00 00 58-02 18 9C 11 09 A9 D3 01 .......X........
000100 06 00 01 03 06 00 01 D3-FB FF 05 00 32 00 00 00 ............2...
000110 00 00 06 00 08 00 00 00-3A 01 00 00 08 00 02 00 ........:.......
000120 00 00 42 01 00 00 00 00-00 00 00 00 00 00 00 00 ..B.............
000130 00 00 00 00 00 00 00 00-00 00 00 23 7C 00 78 00 ...........#|.x.
000140 00 00 00 00 54 68 69 73-20 69 73 20 61 6E 20 65 ....This is an e
000150 78 61 6D 70 6C 65 2E xample.
000160 0A .
In this case, the entire file fits on a single screen. Normally it
will not, and you will have to page down through the displays (use the
Page Down key).
The file is displayed in lines of sixteen characters each. The
sixteen characters are shown in the column on the right (with periods
replacing everything but the ordinary ASCII characters). The left
hand column has the numbers we are interested in. The middle has the
hexadecimal representation of the 16 ASCII characters, and you can
ignore that.
Let's look at the first line. The number in the left hand column shows
the offset in the file of the first character on the line. It is
000000, easily read as zero. To find the offset of other characters,
you count over to them in hexadecimal. Thus the W is at offset
000001, the P at offset 000002, and so forth up to the last character
on the line, which is at offset 00000F. In hexadecimal, the next
number after 00000F is 000010 (which is 16 in decimal). That is the
offset of the first character on the second line. To get the offsets
of other characters on the second line, you count over to them. Thus
the 2 is at 000014, and the last character on the second line is at
00001F.
The offset of the start of the text is actually shown on the first
line. It is stored in a "double word" starting at offset 4. Because
of the way numbers are stored in MS-DOS computers, you can't simply
enter the hexadecimal representations of the bytes from offset 4
through offset 7 after the -d on the command line. You need to enter
them backwards: 7,6,5,4. In this case, that yields 00,00,01,44, or,
ignoring leading zeros, 144. That happens to be the answer in this
case. The trouble is that if the file is messed up, that number may
also be messed up. So we want to be able to find the right number in
another way.
Look in the right hand column for the beginning of the text of the
document ("This is an example"). In this case, we find it on the line
beginning at offset 000140. We then need to count over to the
beginning of the text, the T that begins the sentence. It is a
000144. We have found the number we need. Since we can ignore
leading zeros, we now know that we need the following command line:
C:>WPMD Example Result -d144
And that is all that Drastic Surgery requires. Of course, the
original problem may well not be solved. Take the output file from
Drastic Surgery and try it in the Ordinary Way.
David Seidman
Software by Seidman
2737 Devonshire Pl. NW
Washington, DC 20008
CompuServe: [70441,2414]
*********************************************************************
RELATED PROGRAMS
LIST --
LIST can be found on almost any BBS that has files for downloading,
but you can also order it from the author for $20. The address is
Vernon D. Buerg
139 White Oak Circle
Petaluma CA 94952
FIXPRE --
FIXPRE, which is also useful in curing the ills of WPerf5 files, is
part of the shareware package WPTOOLS. WPTOOLS is a collection of 14
shareware utilities for use with WPerf5, with an additional six
provided to registered users. At this writing, the latest version of
WPTOOLS is 5.0. WPTOOLS is available on many BBSs and on CompuServe in
the WPSG and IBMAPP forums. Or you can order it for $25 from Software
by Seidman, plus $2.00 for shipping and handling. For your
convenience, an order form appears below.
Here are brief descriptions of all 20 WPTOOLS programs:
COMMENTS Reads a WP5 document file, extracts the comments, and writes
them to standard output.
DISKFONT Searches a directory for specified soft font files and,
optionally, lists descriptive information about the fonts it
finds.
ENDFOOT Converts all footnotes (endnotes) to endnotes (footnotes),
changing automatic references appropriately.
FIXPRE Removes deleted (and optionally other) data packets from the
prefix of WP5 document files and removes deleted data packets
from WP5 setup files (WP{WP}.SET). For document files, this
will often facilitate changing the printer driver used with
the file and shrink the file. Setup files grow as you modify
your setup; FIXPRE shrinks them again. And FIXPRE sometimes
helps when WP5 just seems to be acting strangely. Optionally
deletes styles, initial codes. Also works with PP5 set
files, and perhaps with set files from other forthcoming
WPCorp programs.
FONTFILE Lists the file names of the soft font files specified in a
PRS file.
FONTLIST Lists the names of the fonts used in a WP5 document and the
PRS file the document calls for.
IS5XDOC Identifies WP5 document files. Useful in batch files.
LISTMACS Lists the names and descriptions of macros in WPM and WPK
files (and the keys for WPK macros), optionally sorted.
Also works with PP5 macro and keyboard files.
MAKETABS Converts an ASCII text file to a WP50 document, replacing
spaces by tabs. Used with columnar material.
MASTER Reads a WP5 master document and lists the unexpanded
subdocuments it calls for.
MERGESUM Creates (or adds to) a WP50 secondary merge file, each
record containing the information from a WP5 document
summary (or, optionally, the first 400 or so characters of a
document if no summary was created), along with information
from the DOS file directory. In effect, creates a database
of document summaries that can be processed using the WP5
Merge and Sort functions, or WordPerfect's Notebook program.
PRINTIT Paginates and formats an ASCII text file for printing.
PRSFONTS Lists and optionally numbers the names of the fonts
available in a WP5 PRS file.
STYLIST Lists names and descriptions of styles, optionally sorted.
STYLEUSE Lists the styles used in the text of a document. Lists the
styles found in the prefix but not used in the document.
Optionally deletes unused (or all) styles from the prefix.
Optionally deletes style on and off codes from the text of a
document, leaving the codes added by the style.
TARGETS Lists the automatic reference targets and references in a
WP5 document file, indicating unreferenced targets and
references to nonexistent targets.
WHATPTRS Lists the printers described in ALL files, optionally sorted
by printer name.
WP5LOOK Displays one or more WP5 document files specified on the
command line (or piped to the program). Particularly
because files can be specified with wildcards, WP5LOOK may
be more convenient than WP5 itself for browsing through WP5
documents.
WPGSIZE Extracts and lists the dimensions of the image coordinate
space for WPG files. Useful in getting the aspect ratio
right.
WPSNOOP Determines, in greater or lesser detail, the file type of
many, but not all, files associated with recent WordPerfect
Corporation products. For WP5 document files, lists the
document summary and the PRS file. For macro files, lists
the description. Optionally reveals the structure of WP5
document file prefixes and of set file prefixes.
*********************************************************************
LICENSE, WARRANTY, AND REGISTRATION INFORMATION
WPMD is not in the public domain. It is are fully protected by
copyright.
You are granted without charge a license which permits (a) use of the
program for a reasonable period for evaluation and testing; (b) making
copies for distribution to others without charge, provided the program
and the accompanying documentation are distributed together and without
modification; (c) posting the program, together with the accompanying
documentation, on electronic bulletin board systems.
How long is a reasonable period? The idea of shareware is that you
should be able to try a program before deciding to buy it. But unless
you have a broken WordPerfect 5 file, you really are not in a position
to try WPMD. You probably would like to keep WPMD around as a kind of
insurance policy, hoping that if a problem ever develops with a
WordPerfect 5 file, WPMD can help fix it. Although I would prefer that
you sent your license fee simply because you have heard WPMD is a good
program, it is reasonable that you would not do so.
Once you have tried WPMD on one of your broken files and found that it
does work, the clock starts ticking on reasonableness. After all, if
WPMD saved a single file of any substantial size for you, you should
not have to wait for more information before deciding it is worth $35
to you. I think more than two weeks after that point is unreasonable.
And that is what a "reasonable period" means for purposes of this
license.
Use after the reasonable evaluation and testing period requires payment
of a license fee. For a single copy (plus necessary archival copies),
to be used on only one computer at a time, the fee is $35.00. For your
convenience, an invoice form is included below. For large quantities,
discounts and site licenses are available. Write for information. Any
license for which payment is properly made is valid for this version of
WPMD and all subsequent versions.
What do you get for your license fee? Aside from permission to use the
program and the warm feeling that you are not violating the copyright
laws, not very much, but a little. If you pay the license fee to me
and tell me the version you have (or if I can figure out what version
you have), I will send you the next version (unless the next version
involves a trivial change too small to worry you about). And if you
let me know about any problems you have with the program, I will try to
solve them.
Users groups and other not-for-profit organizations may distribute
unmodified copies of WPMD, together with its accompanying
documentation, for a fee to cover duplication and related costs, but
not to exceed $6.00. Your payment of such a fee does not eliminate the
requirements concerning payment of a license fee. Certain
organizations may have been granted permission to distribute the
program for a fee larger than $6.00, the larger fee to include the
license fee for a single copy. If the organization from which you
received a copy of the program has been granted that permission, it
should tell you so.
The United States Department of Justice is granted a license, without
payment of fee, for all official use of WPMD.
WARRANTY INFORMATION
WPMD is distributed without warranties of any kind, express or implied,
including, but not limited to, the implied warranties of
merchantability and fitness for a particular purpose.
No representation or other affirmation of fact, including but not
limited to statements regarding suitability for use, or performance of
WPMD, shall be or be deemed a warranty by the licensor for any purpose,
nor give rise to any liability or obligation of the licensor whatever.
In particular, no statement in program documentation shall be deemed a
representation or warranty that the program will perform in any
particular manner, or perform in any manner whatsoever, or that the
program is suitable for any particular use or any use at all.
* * * * * * * * * * * * * * *
INVOICE
David Seidman
Software by Seidman
2737 Devonshire Pl. NW
Washington, DC 20008
DATE:
SOLD TO:
__________________________
__________________________
_________________________
┌──────────────────────────────────────┬────────────────────────┐
│ Description │ Price │
│ │ │
├──────────────────────────────────────┼────────────────────────┤
│ │ │
│ License for WPMD │ $ 35.00 │
│ │ │
│ additional licenses @ $35.00 │ _____.__ │
│ │ │
│ │ │
│ │ │
│ │ │
└──────────────────────────────────────┴────────────────────────┘
Total: $_____.__
D.C. Residents add 6% D.C. Sales Tax: ___.__
Total Charge: $_____.__
Make checks payable to Software by Seidman. Please mark checks "WPMD".
------------------------------------------------------------
ORDER FORM FOR WPTOOLS
David Seidman
Software by Seidman
2737 Devonshire Pl. NW
Washington, DC 20008
DATE:
SHIP TO:
__________________________
__________________________
_________________________
┌──────────────────────────────────────┬────────────────────────┐
│ Description │ Price │
│ │ │
├──────────────────────────────────────┼────────────────────────┤
│ │ │
│ Licensed copy of WPTOOLS │ $ 25.00 │
│ │ │
│ additional copies @ $25.00 │ _____.__ │
│ │ │
│ │ │
│ │ │
│ │ │
└──────────────────────────────────────┴────────────────────────┘
Total: $_____.__
D.C. Residents add 6% D.C. Sales Tax: ___.__
Shipping and handling: 2.00
Total Charge: $_____.__
Make checks payable to Software by Seidman. Please mark checks
"WPTOOLS".
------------------------------------------------------------